import { getGroupDetailApi } from '@renderer/api/group'
import { defineStore } from 'pinia'

const useGroup = defineStore('useGroup', {
  state: () => ({}),
  actions: {
    // 获得群聊详细信息
    getGroupInfoAction(groupId: string | number) {
      return new Promise((resolve) => {
        getGroupDetailApi(groupId).then((res) => {
          resolve(res.data)
        })
      })
    }
  }
})

export default useGroup
